﻿@model GameSchool.Models.Common.ChangePasswordModel

@{
    ViewBag.Title = "Breyta lykilorði";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Breyta lykilorði</h2>
<p>
    Fylltu inn í svæðin hér að neðan. 
</p>
<p>
    Ný lykilorð verða að vera @Membership.MinRequiredPasswordLength stafir að lengd.
</p>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true, "Breyting á lykilorði tókst því miður ekki. Vinsamlegast reyndu aftur.")
    <div>
        <fieldset>
            <legend>Notenda upplýsingar</legend>

            <div class="editor-label">
                @Html.LabelFor(m => m.OldPassword)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.OldPassword)
                @Html.ValidationMessageFor(m => m.OldPassword)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.NewPassword)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.NewPassword)
                @Html.ValidationMessageFor(m => m.NewPassword)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.ConfirmPassword)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.ConfirmPassword)
                @Html.ValidationMessageFor(m => m.ConfirmPassword)
            </div>

            <p>
                <input type="submit" value="Breyta lykilorði" />
            </p>
        </fieldset>
    </div>
}
